package com.nj9you.sdk.pay;

import android.content.Context;

import com.nj9you.sdk.framework.IPayFunction;
import com.nj9you.sdk.framework.PayResult;
import com.nj9you.sdk.params.PayParams;
import com.nj9you.sdk.utils.Utils;

/**
 * Created by Administrator on 2017/7/9.
 */

public class ShenzhouPay implements IPay {

    private Context mContext;
    private IPayFunction mPayFunction;

    @Override
    public void init(Context context, IPayFunction f) {
        mContext = context;
        mPayFunction = f;
    }

    @Override
    public void pay(PayParams payParams) {
        if (mPayFunction != null) {
            String desc = mContext.getString(Utils.getStringId(mContext, "jy_unimplemention"));
            mPayFunction.notifyPayResult(PayResult.PAY_FAILURE, desc, this);
        }
    }

    @Override
    public String getPayName() {
        return mContext.getString(Utils.getStringId(mContext, "jy_shenzhoufu"));
    }

    @Override
    public int getPayType() {
        return PAY_TYPE_SHENZHOUPAY;
    }

    @Override
    public boolean checkPayAvailable() {
        return false;
    }

    @Override
    public int getPayIcon() {
        return 0;
    }

    @Override
    public String getPayDesc() {
        return null;
    }

    @Override
    public String toString() {
        return getPayName();
    }
}
